$(document).ready(function() {
	//Qtip
	var content_attr = 'title';
	if(typeof( useTitle ) != 'undefined') {
		content_attr = useTitle;
	}	
	$('.tooltip').qtip({
		content: {
			attr: content_attr,
		},
		style: {
			classes: 'ui-tooltip-tipped ui-tooltip-shadow ui-tooltip-rounded',
			width: '280px',
			tip: {
   				corner: 'bottom center'
    		}
		},
		position: {
			my: 'bottom center',
			at: 'top center',
			viewport: $(window)
		},
		show: {
			effect: function(offset) {
				$(this).fadeIn(300); // this refers to the tooltip
			},
		},
		hide: {
			delay: 200,
			fixed: true
		}
	});
	$('.tooltip_disappear').qtip({
		content: {
			attr: content_attr,
		},
		style: {
			classes: 'ui-tooltip-tipped ui-tooltip-shadow ui-tooltip-rounded',
			width: '280px',
			tip: {
   				corner: 'bottom center'
    		}
		},
		position: {
			my: 'bottom center',
			at: 'top center',
			viewport: $(window)
		},
		show: {
			effect: function(offset) {
				$(this).fadeIn(300); // this refers to the tooltip
			},
		},
		hide: {
			delay: 0
		}
	});
});